package ModelLayer;

public class Invoice
{
	private int invoiceNo;
	private String paymentDate;
	private float price;
	private float deliveryCharge = 25;
	private float freightCharge = 45;
	
	
	public Invoice()
	{}
	
	public Invoice(int number)
	{
		this.invoiceNo = number;
	}
	
	public Invoice(int invoiceNo, String paymentDate, float price) {
		super();
		this.invoiceNo = invoiceNo;
		this.paymentDate = paymentDate;
		this.price = price;
	}
	
	public int getInvoiceNo()
	{
		return invoiceNo;
	}
	public void setInvoiceNo(int invoiceNo)
	{
		this.invoiceNo = invoiceNo;
	}

	public String getPaymentDate()
	{
		return paymentDate;
	}
	public void setPaymentDate(String paymentDate)
	{
		this.paymentDate = paymentDate;
	}

	public float getPrice()
	{
		if (price>2500)
		{
			return price;
		}
		else
		{
			return price+deliveryCharge+freightCharge;			
		}
	}

	public void setPrice(float price)
	{
		this.price = price;
	}
}
